package lab02.test06;

public class Ladder {
    double up;
    double down;
    double high;
    double area;

    Ladder() {
    }

    Ladder(double up, double down, double high) {
        this.up = up;
        this.down = down;
        this.high = high;
    }

    double area() {
        area = (up + down) * high / 2;
        System.out.println("梯形面积为：" + area);
        return area;
    }
}
